﻿using Microsoft.Practices.Unity;

using CaltechSoft.Service.EntityFW.Entity;
using CaltechSoft.Service.EntityFW.Repository;
using CaltechSoft.Service.Infrastructure;
using CaltechSoft.Service.CommandService;
using Ninject;
using CaltechSoft.Service.ReportService;
using CaltechSoft.Service.ReportService.Standard;
using CaltechSoft.Service.CommandService.WorkOrder;
using CaltechSoft.Service.ReportService.WorkOrder;
namespace CaltechSoft.Services
{
    public class ServiceComponentsRegister
    {
        public static void RegisterServicesComponents(IKernel kernel)
        {
            kernel.Bind<IUnitOfWork>().To<UnitOfWork>();
            kernel.Bind<ICommandExecutor>().To<CommandExecutor>();
            kernel.Bind<ICertificateCommandService>().To<CertificateCommandService>();
            kernel.Bind<ICertificateStandardCommandService>().To<CertificateStandardCommandService>();
            kernel.Bind<ICustomerCommandService>().To<CustomerCommandService>();
            kernel.Bind<IEquipmentCommandService>().To<EquipmentCommandService>();
            kernel.Bind<ICertificateDetailsCommandService>().To<CertificateDetailsCommandService>();
            kernel.Bind<ICertificateReportService>().To<CertificateReportService>();
            kernel.Bind<IStandardReportService>().To<StandardReportService>();
            kernel.Bind<IWorkOderCommandService>().To<WorkOrderCommandService>();
            kernel.Bind<IWorkOrderReportService>().To<WorkOrderReportService>();
            kernel.Bind<ICustomerEquipmentCommandService>().To<CustomerEquipmentCommandService>();

            kernel.Bind<IGenericRepository<Certificate>>().To<GenericRepository<Certificate>>();
            kernel.Bind<IGenericRepository<Customer>>().To<GenericRepository<Customer>>();
            kernel.Bind<IGenericRepository<Equipment>>().To<GenericRepository<Equipment>>();
            kernel.Bind<IGenericRepository<CustomerEquipment>>().To<GenericRepository<CustomerEquipment>>();
            kernel.Bind<IGenericRepository<CertificateDetails>>().To<GenericRepository<CertificateDetails>>();
            kernel.Bind<IGenericRepository<CertificateStandard>>().To<GenericRepository<CertificateStandard>>();
            kernel.Bind<IGenericRepository<WorkOrder>>().To<GenericRepository<WorkOrder>>();

        //    private readonly IGenericRepository<EntityFW.Entity.Certificate> _certificateGenericRepository;
        //private readonly IGenericRepository<EntityFW.Entity.Customer> _customerGenericRepository;
        //private readonly IGenericRepository<EntityFW.Entity.Equipment> _equipmentGenericRepository;
        //private readonly IGenericRepository<EntityFW.Entity.CertificateDetails> _certificateDetailsGenericRepository;
        //private readonly IGenericRepository<EntityFW.Entity.CertificateStandard> _certificateStandardGenericRepository;


        }
    }
}
